package com.demo2;

/**
 * Created by Administrator on 2017/3/25.
 */
public class XunHuan4 {
    public static void main(String[] args) {
        int n;
        int sum = 0;
        for (n = 100; n > 0; n--) {
            sum += n;
        }
        System.out.println("1到100各个整数的和:" + sum);
    }
}
